home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / du_lib / dtext.c next >
C/C++ Source or Header  |  1995-07-10  |  654b  |  32 lines

  1. /*
  2.   DU_LIB v2
  3.   Gem Window Management & Dialog Library For Lattice C
  4.   ½1994, by Craig Graham.
  5.   
  6.   Based on the DU_LIBv1 Library for HiSoft Basic.
  7. */
  8.  
  9. /*
  10.   Dialog Text Manipulation
  11. */
  12.  
  13. #include "dulib.h"
  14.  
  15. /* Sets a text object in a dialog to a given string*/
  16. short set_dialog_text(short dialog, short object, char* t)
  17. {
  18.     OBJECT* TheDial;
  19.     OBJECT* ob;
  20.     TEDINFO* tedinfoblk;
  21.  
  22.     rsrc_gaddr(0,dialog,&TheDial);            /*Address of dialog*/
  23.     ob=TheDial+object;                        /*Address of object*/
  24.  
  25.     tedinfoblk=(TEDINFO*)ob->ob_spec;        /*Address of TedInfo structure*/
  26.  
  27.     tedinfoblk->te_ptext=t;
  28.     tedinfoblk->te_txtlen=strlen(t);
  29.  
  30.     return 0;
  31. }
  32.